<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<html>
	<head>
		<title>区域管理</title>
		<script>
			$(document).ready(function() {
				//聚焦第一个输入框
				$("#consignor_name").focus();
				//为inputForm注册validate函数
				$("#inputForm").validate();
			});
		</script>
	</head>
	
	<body>
	<section class="content">
		<div class="row">
		<div class="col-md-12">
			<div class="box box-solid box-primary">
			<div class="box-header">
					<i class="fa fa-edit"></i>
					<h3 class="box-title">发货人管理</h3>
					<div class="box-tools pull-right">
						<button class="btn btn-primary btn-sm" data-widget="collapse">
							<i class="fa fa-minus"></i>
						</button>
					</div>
				</div>
				<div class="box-body">
		<form id="inputForm" action="${ctx}/v2/consignor/${action}" method="post" class="form-horizontal">
			<input type="hidden" name="id" value="${consignor.id}"/>
			<fieldset>
				<div class="form-group row">
					<label for="consignor_name" class="col-sm-3 control-label">发货人名:</label>
					<div class="col-sm-6">
						<input type="text" id="consignor_name" name="name"  value="${consignor.name}" class="form-control input-large required" minlength="1"/>
					</div>
				</div>
				
				<div class="form-group row">
					<label for="consignor_mobile" class="col-sm-3 control-label">手机号码:</label>
					<div class="col-sm-6">
						<input type="text" id="consignor_mobile" name="mobile"  value="${consignor.mobile}" class="form-control input-large required" minlength="1"/>
					</div>
				</div>
				<div class="form-group row">
					<label for="consignor_phone" class="col-sm-3 control-label">电话号码:</label>
					<div class="col-sm-6">
						<input type="text" id="consignor_phone" name="phone"  value="${consignor.phone}" class="form-control input-large" minlength="1"/>
					</div>
				</div>
				<div class="form-group row">
					<label for="consignor_zipcode" class="col-sm-3 control-label">邮政编码:</label>
					<div class="col-sm-6">
						<input type="text" id="consignor_zipcode" name="zipcode"  value="${consignor.zipcode}" class="form-control input-large" minlength="1"/>
					</div>
				</div>
				<div class="form-group row">
					<label for="consignor_province" class="col-sm-3 control-label">国家:</label>
					<div class="col-sm-6">
						<input type="text" id="consignor_sendCountry" name="sendCountry"  value="${consignor.sendCountry}" class="form-control input-large" minlength="1"/>
					</div>
				</div>
				<div class="form-group row">
					<label for="consignor_province" class="col-sm-3 control-label">省份:</label>
					<div class="col-sm-6">
						<input type="text" id="consignor_province" name="province"  value="${consignor.province}" class="form-control input-large required" minlength="1"/>
					</div>
				</div>
				<div class="form-group row">
					<label for="consignor_city" class="col-sm-3 control-label">城市:</label>
					<div class="col-sm-6">
						<input type="text" name="city"  value="${consignor.city}" class="form-control input-large required" minlength="1"/>
					</div>
				</div>
				<div class="form-group row">
					<label for="consignor_district" class="col-sm-3 control-label">地区:</label>
					<div class="col-sm-6">
						<input type="text" name="district"  value="${consignor.district}" class="form-control input-large required" minlength="1"/>
					</div>
				</div>
				<div class="form-group row">
					<label for="consignor_address" class="col-sm-3 control-label">地址:</label>
					<div class="col-sm-6">
						<input type="text" name="address"  value="${consignor.address}" class="form-control input-large required" minlength="1"/>
					</div>
				</div>
				<div class="form-group row">
					<label for="consignor_ugc" class="col-sm-3 control-label">备注:</label>
					<div class="col-sm-6">
						<input type="text" name="ugc"  value="${consignor.ugc}" class="form-control input-large" minlength="1"/>
					</div>
				</div>
				<div class="form-group row">
					<label for="consignor_depositoryName" class="col-sm-3 control-label">仓库名:</label>
					<div class="col-sm-6">
						<input type="text" name="depositoryName"  value="${consignor.depositoryName}" class="form-control input-large" minlength="1"/>
					</div>
				</div>
				<div class="form-group row">
					<label for="consignor_salesRerurnMessage" class="col-sm-3 control-label">退货提醒:</label>
					<div class="col-sm-6">
						<textarea rows="2" id="consignor_salesRerurnMessage" name="salesRerurnMessage"  value="${consignor.salesRerurnMessage}" class="form-control input-large" minlength="1" ></textarea>
					</div>
				</div>
				<div class="form-group row">
					<label for="consignor_salesRerurnAddress" class="col-sm-3 control-label" >退货地址:</label>
					<div class="col-sm-6">
						<textarea rows="2" id="consignor_salesRerurnAddress" name="salesRerurnAddress"  value="${consignor.salesRerurnAddress}" class="form-control input-large" minlength="1" ></textarea>
					</div>
				</div>
				<div class="modal-footer bg-gray">
					<input id="submit_btn" class="btn btn-primary" type="submit" value="提交"/>&nbsp;	
					<a id="cancel_btn" class="btn btn-default" type="button" href="${ctx}/v2/customers/v2_show">返回</a>
				</div>
			</fieldset>
		</form>
		<script type="text/javascript">
		    $("#consignor_salesRerurnMessage").val("${consignor.salesRerurnMessage}");
		    $("#consignor_salesRerurnAddress").val("${consignor.salesRerurnAddress}");
		</script>
		</div>
		</div>
		</div>
		</div>
		</section>
	</body>
</html>